ostree-sign-
ed25519: Fix overwriting already-set GErrors
There were a couple of issues here, related to passing a `GError**` into
a sub-function inside a loop:
- If multiple calls inside the loop failed (e.g. if multiple keys
inside the file were invalid, because it was a malformed file), the
`GError` would be overwritten and cause a critical warning from GLib.
- If an early iteration failed, but then subsequent ones succeeded, the
`_load_pk_from_stream()` function would return `TRUE` but would also
set its `GError`, which is a very non-standard (basically prohibited)
thing to do with a `GError` argument.
Fix that by using a `first_error` variable internally and only
propagating it to the caller on failure.
This can be reproduced by trying to verify a signature using a key file
which isn’t actually a key file:
```
ostree sign --verify --repo ./my-repo $commit_id \
--keys-file ./test.published.gpg
```
The keys file is expected to be in a custom format, with one
ed25519 key
per line. An ASCII-armoured GPG keyring is not that format, and causes
it to go big boom.
Signed-off-by: Philip Withnall <pwithnall@gnome.org>